package flow;

public class ForeachDemo {

    static int[] getArray() {
        System.out.println("get array");
        return new int[]{1, 2, 3, 4};
    }

    public static void main(String[] args) {
        for (int i : getArray()) {
            System.out.println(i);
        }
    }
}
